<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>楼层管理</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link href="../css/global.css" rel="stylesheet" type="text/css" />
<link href="../css/manage.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/ahover.js"></script>
<script type="text/javascript" src="../js/formValidator-4.0.1.js"
	charset="UTF-8"></script>
<script type="text/javascript" src="../js/formValidatorRegex.js"
	charset="UTF-8"></script>
</head>
<body>

	<c:import url="../common/top.jsp"></c:import>
	<span class="blank18"></span>
<div class="page">
	<c:import url="../common/left.jsp"></c:import>
<!-- 列表内容 begin -->
	<div class="container">
		    	<div class="connav">
			       		» <a href="./list">楼层管理</a> &gt; 新建楼层    	</div>
		    	<!--  主体   start -->
		    	
		    	<script type="text/javascript" language="javascript">
$(function(){
	var regionArr=[];
	<c:forEach items="${allRegionList }" var="region">
	var region={};
	region.id=${region.id };
	region.name='${region.name }';
	region.warehouseId=${region.warehouseId };
	regionArr.push(region);
	<c:if test="${region.id==currentObj.regionId}">
	<c:set var="currentWarehouseId" value="${region.warehouseId }"></c:set>
	</c:if>
	</c:forEach>
	$('#warehouseId').change(function(){
		var warehouseId= $(this).val();
		$('#regionId').empty();
		for(var index in regionArr){
			var region=regionArr[index];
			if(region.warehouseId==warehouseId){
				$('#regionId').append('<option value="'+region.id+'">'+region.name+'</option>');
			}
		}
		
	}).change();
	
	
});

</script>
<form name="form1" id="form1" action="./save" method="post">
<input type="hidden" name="id" value="${currentObj.id }"/>
<div class="userinfolist">
<h3 class="navbig"><span class="navleft"><em class="ico"></em><c:choose><c:when test="${currentObj ==null }">添加</c:when>
<c:otherwise>修改</c:otherwise></c:choose>楼层信息</span></h3>
     <div class="new_item">
		<div class="tit"><em>*</em>名称：</div>
		<div class="bdmain">
		
			<label onmouseout="this.className='input_out'" onmousemove="this.className='input_move'" onblur="this.className='input_off';this.onmouseout=function(){this.className='input_out'};" onfocus="this.className='input_on';this.onmouseout=''" class="input_out">
				<input type="text" id="name" name="name" value="${currentObj.name }">
			</label>
			
		</div><div class="new_plus"><span id="nameTip"></span></div>
    </div>
      <div class="new_item">
		<div class="tit"><em>*</em>所在仓库：</div>
		<div class="bdmain">
		
			<select id="warehouseId" name="warehouseId"> 
			<c:forEach items="${allWarehouseList }" var="warehouse">
			<option value="${warehouse.id }" <c:if test="${currentWarehouseId==warehouse.id }">selected="selected"</c:if>>${warehouse.name}</option>
			</c:forEach>
			</select>
			
		</div><div class="new_plus"><span id="nameTip"></span></div>
    </div>
      <div class="new_item">
		<div class="tit"><em>*</em>所在库区：</div>
		<div class="bdmain">
		
			<select  id="regionId" name=regionId> 
			<c:forEach items="${allRegionList }" var="region">
			</c:forEach>
			</select>
			
		</div><div class="new_plus"><span id="nameTip"></span></div>
    </div>
     <div class="new_item">
		<div class="tit"><em>*</em>楼层容量(核心品规)：</div>
		<div class="bdmain">
			<label onmouseout="this.className='input_out'" onmousemove="this.className='input_move'" onblur="this.className='input_off';this.onmouseout=function(){this.className='input_out'};" onfocus="this.className='input_on';this.onmouseout=''" class="input_out">
				<input type="text" id="levelCoreCapacity" name=levelCoreCapacity value="${currentObj.levelCoreCapacity }">
			</label>
			
		</div><div class="new_plus"><span id="capacityOfCoreTip"></span></div>
    </div>
	
     <div class="new_item">
		<div class="tit"><em>*</em>楼层容量(关联品规)：</div>
		<div class="bdmain">
		
			<label onmouseout="this.className='input_out'" onmousemove="this.className='input_move'" onblur="this.className='input_off';this.onmouseout=function(){this.className='input_out'};" onfocus="this.className='input_on';this.onmouseout=''" class="input_out">
				<input type="text" id="levelRelatedCapacity" name="levelRelatedCapacity" value="${currentObj.levelRelatedCapacity }">
			</label>
			
		</div><div class="new_plus"><span id="capacityOfRelatedTip"></span></div>
    </div>
     <div class="new_item">
		<div class="tit"><em>*</em>楼层容量(一般品规)：</div>
		<div class="bdmain">
		
			<label onmouseout="this.className='input_out'" onmousemove="this.className='input_move'" onblur="this.className='input_off';this.onmouseout=function(){this.className='input_out'};" onfocus="this.className='input_on';this.onmouseout=''" class="input_out">
				<input type="text" id="levelCommonCapacity" name="levelCommonCapacity" value="${currentObj.levelCommonCapacity }">
			</label>
			
		</div><div class="new_plus"><span id="capacityOfCommonTip"></span></div>
    </div>
     <div class="new_item">
		<div class="tit"><em>*</em>楼层容量阀值(核心品规)：</div>
		<div class="bdmain">
			<label onmouseout="this.className='input_out'" onmousemove="this.className='input_move'" onblur="this.className='input_off';this.onmouseout=function(){this.className='input_out'};" onfocus="this.className='input_on';this.onmouseout=''" class="input_out">
				<input type="text" id="levelCoreThreshold" name="levelCoreThreshold" value="${currentObj.levelCoreThreshold }">
			</label>
			
		</div><div class="new_plus"><span id="capacityOfCoreTip"></span></div>
    </div>
	
     <div class="new_item">
		<div class="tit"><em>*</em>楼层容量阀值(关联品规)：</div>
		<div class="bdmain">
		
			<label onmouseout="this.className='input_out'" onmousemove="this.className='input_move'" onblur="this.className='input_off';this.onmouseout=function(){this.className='input_out'};" onfocus="this.className='input_on';this.onmouseout=''" class="input_out">
				<input type="text" id="levelRelatedThreshold" name="levelRelatedThreshold" value="${currentObj.levelRelatedThreshold }">
			</label>
			
		</div><div class="new_plus"><span id="capacityOfRelatedTip"></span></div>
    </div>
     <div class="new_item">
		<div class="tit"><em>*</em>楼层容量阀值(一般品规)：</div>
		<div class="bdmain">
		
			<label onmouseout="this.className='input_out'" onmousemove="this.className='input_move'" onblur="this.className='input_off';this.onmouseout=function(){this.className='input_out'};" onfocus="this.className='input_on';this.onmouseout=''" class="input_out">
				<input type="text" id="levelCommonThreshold" name="levelCommonThreshold" value="${currentObj.levelCommonThreshold }">
			</label>
			
		</div><div class="new_plus"><span id="capacityOfCommonTip"></span></div>
    </div>
</div>
<div class="addtoadsub">
	<input type="submit" class="subglobal sub1" value="提交" name="btnSubmit" id="btnSubmit">
	<input type="reset" class="escglobal sub2" value="重置" name="btnSubmit" id="btnSubmit">       
</div>
</form>
<script type="text/javascript">
$(document).ready(function() {
	$.formValidator.initConfig({formID:"form1",debug:false,submitOnce:true,
		onError:function(msg,obj,errorlist){
		
		},
		submitAfterAjaxPrompt : '有数据正在异步验证，请稍等...'
	});
			
			$("#name").formValidator({
		tipID:"nameTip",
		onShow:"",
		onFocus:"",
		onCorrect:""
	}).inputValidator({
		min:1,
		onError: "请填写楼层名称!"
	});
	
			$("#capacityOfCore").formValidator({
		tipID:"capacityOfCoreTip",
		onShow:"",
		onFocus:"",
		onCorrect:""
	}).inputValidator({
		min:1,
		onError: "请填写核心品规容量!"
	});
	
			$("#capacityOfRelated").formValidator({
		tipID:"capacityOfRelatedTip",
		onShow:"",
		onFocus:"",
		onCorrect:""
	}).inputValidator({
		min:1,
		onError: "请填写关联品规容量!"
	});
			$("#capacityOfCommon").formValidator({
		tipID:"capacityOfCommonTip",
		onShow:"",
		onFocus:"",
		onCorrect:""
	}).inputValidator({
		min:1,
		onError: "请填写一般品规容量!"
	});
	


	 

});
</script>
</div>
</div>
<span class="blank12"></span>
	<div class="footer">
		储运管理系统
	</div>
</body>
</html>
